@(usuario: List[Usuario])

@import helper._
@import helper.twitterBootstrap._

@main("Listar"){
	<div>
		<table class="table table-striped">	
			<caption>
				<h3>
					Tabela de Usuarios
				</h3>
			</caption>
			<thead>
				<tr>
					<th>Email</th>
					<th>Senha</th>
					<th>Nome</th>
					<th>Data de Nascimento</th>
					<th>Perfil</th>
				</tr>
			</thead>
			<tbody>
				@for(u <- usuario){
					<tr>
			    		<td>@u.email</td>
			    		<td>@u.senha</td>
			    		<td>@u.nome</td>
			    		<td>@u.dataNascimento</td>
			    		<td>@u.perfil</td>
			    		<td>
			    			@helper.form(action = routes.CtrlUsuario.editar()){
			    				<input type="hidden" value="@u.email" name="email">
			    				<input type="hidden" value="@u.senha" name="senha">
			    				<input type="hidden" value="@u.nome" name="nome">
			    				<input type="hidden" value="@u.dataNascimento" name="dataNascimento">
			    				<input type="hidden" value="@u.perfil" name="perfil">
			    				<button type="submit" class="btn btn-primary" value="editar">Editar</button>
			    			}
			    		</td>
			    		<td>
			    			@helper.form(action = routes.CtrlUsuario.deletar()){
			    				<input type="hidden" value="@u.email" name="email">
			    				<button type="submit" class="btn btn-danger" value="deletar">Deletar</button>
			    			}
			    		</td>
		  			</tr>
		  		}
	  		</tbody>
	  	</table>
	  	<a href="/usuario/inserir" class="btn btn-primary">Inserir</a>
	</div>
}